package com.swz.dcrm.adpter;

import android.content.Context;

import com.swz.dcrm.R;
import com.swz.dcrm.base.ViewHolder;
import com.swz.dcrm.model.GroupGoal;


import java.util.List;

public class GroupGoalAdapter extends CustomAdapter<GroupGoal> {
    public GroupGoalAdapter(Context context,  List<GroupGoal> datas) {
        super(context, R.layout.item_group_goal, datas);
    }

    @Override
    protected void convert(ViewHolder holder, GroupGoal group, int position) {
            holder.setText(R.id.tv_group_name,group.getGroupName());
            holder.setText(R.id.tv_goal1,group.getGroupBuildFileCount()+"");
        holder.setText(R.id.tv_goal2,group.getGroupOrderCarCount()+"");
        holder.setText(R.id.tv_goal3,group.getGroupDeliveryCarCount()+"");
        holder.itemView.setOnClickListener(v -> {
            if(onClickListener!=null){
                onClickListener.onItemClick(group);
            }
        });
    }
}
